package com.service.impl;

import com.dao.IStudentDAO;
import com.dao.impl.StudentDAOImpl;
import com.entity.PageData;
import com.entity.Student;
import com.service.IStudentService;
import com.util.BaseDAO;

import java.util.List;
import java.util.Map;

public class StudentServiceImpl implements IStudentService {
    @Override
    public int delete(String ids) {
        return studentDAO.delete(ids);
    }

    private IStudentDAO studentDAO=new StudentDAOImpl();

    @Override
    public int update(Student student) {
        return studentDAO.update(student);
    }

    @Override
    public PageData queryByPage(Integer pageNo, Integer pageSize) {
        return studentDAO.queryByPage(pageNo,pageSize);
    }

    @Override
    public int add(Student student) {
        return studentDAO.insert(student);
    }

    @Override
    public List<Map<String, Object>> listAll() {
        return studentDAO.listAll();
    }

}
